package br.ufc.minijavaufc.ast;

import br.ufc.minijavaufc.visitor.TypeVisitor;
import br.ufc.minijavaufc.visitor.Visitor;

public class MethodDeclaration {
	public Type type;
	public Identifier identifier;
	public FormalList formalList;
	public VarDeclarationList varDeclarationList;
	public StatementList statementList;
	public Expression expression;

	public MethodDeclaration(Type type, Identifier identifier, FormalList formalList, VarDeclarationList varDeclarationList, StatementList statementList, Expression expression) {
		super();
		this.type = type;
		this.identifier = identifier;
		this.formalList = formalList;
		this.varDeclarationList = varDeclarationList;
		this.statementList = statementList;
		this.expression = expression;
	}

	public MethodDeclaration() {
		super();
	}

	public void accept(Visitor visitor){
		visitor.visit(this);
	}
	
	public void accept(TypeVisitor visitor) {
		visitor.visit(this);
	}

}
